

package com.hazelcast.partition;

/**
 * MigrationState shows statistical information about the migration,
 * such as; migration start time, number of planned replica migrations,
 * number of completed replica migrations, total elapsed migration time etc.
 *
 * @see MigrationListener
 * @see ReplicaMigrationEvent
 */
public interface MigrationState {
    /**
     * Returns the start time of the migration in milliseconds since the epoch.
     *
     * @return start time of the migration process
     */
    long getStartTime();

    /**
     * Returns the number of planned migrations in the migration plan.
     *
     * @return number of planned migrations
     */
    int getPlannedMigrations();

    /**
     * Returns the number of completed migrations in the migration plan.
     *
     * @return number of completed migrations
     */
    int getCompletedMigrations();

    /**
     * Returns the number of remaining migrations in the migration plan.
     *
     * @return number of remaining migrations
     */
    int getRemainingMigrations();

    /**
     * Returns the total elapsed time of completed migrations in milliseconds.
     *
     * @return total elapsed time in milliseconds
     */
    long getTotalElapsedTime();

}
